tup = (1,2,3,4,5,6,7)

print(tup[1])
print(tup[0:3])

print(tup[-1])
print(tup[0:-3])

# 元组中的元素值不允许修改

#删除元组
del tup

#元组内置函数
# len(tuple) 元组长度
tuple1 = ('刘备','关羽','张飞','周瑜')
print(len(tuple1))

# max(tuple) 元组最大值
print(max(tuple1))

# min(tuple) 元组最小值
print(min(tuple1))

# tuple(iterable) 将可迭代的序列转换为元组
list = ['曹操','司马懿','夏侯惇']
print(tuple(list))